home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / share / emacs / 19.34 / lisp / mailheader.elc.z / mailheader.elc
Emacs Compiled Lisp  |  1998-10-28  |  5.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 65 72 69 6b 40 70 73 |piled by| erik@ps|
|00000020| 69 6c 6f 63 69 6e 2e 67 | 6e 75 2e 61 69 2e 6d 69 |ilocin.g|nu.ai.mi|
|00000030| 74 2e 65 64 75 20 6f 6e | 20 4d 6f 6e 20 4a 75 6c |t.edu on| Mon Jul|
|00000040| 20 20 31 20 32 30 3a 30 | 31 3a 32 34 20 31 39 39 | 1 20:0|1:24 199|
|00000050| 36 0a 3b 3b 3b 20 66 72 | 6f 6d 20 66 69 6c 65 20 |6.;;; fr|om file |
|00000060| 2f 68 6f 6d 65 2f 67 64 | 2f 67 6e 75 2f 65 6d 61 |/home/gd|/gnu/ema|
|00000070| 63 73 2f 31 39 2e 30 2f | 6c 69 73 70 2f 6d 61 69 |cs/19.0/|lisp/mai|
|00000080| 6c 68 65 61 64 65 72 2e | 65 6c 0a 3b 3b 3b 20 65 |lheader.|el.;;; e|
|00000090| 6d 61 63 73 20 76 65 72 | 73 69 6f 6e 20 31 39 2e |macs ver|sion 19.|
|000000a0| 33 31 2e 34 2e 0a 3b 3b | 3b 20 62 79 74 65 63 6f |31.4..;;|; byteco|
|000000b0| 6d 70 20 76 65 72 73 69 | 6f 6e 20 46 53 46 20 32 |mp versi|on FSF 2|
|000000c0| 2e 31 30 0a 3b 3b 3b 20 | 6f 70 74 69 6d 69 7a 61 |.10.;;; |optimiza|
|000000d0| 74 69 6f 6e 20 69 73 20 | 6f 6e 2e 0a 3b 3b 3b 20 |tion is |on..;;; |
|000000e0| 74 68 69 73 20 66 69 6c | 65 20 75 73 65 73 20 6f |this fil|e uses o|
|000000f0| 70 63 6f 64 65 73 20 77 | 68 69 63 68 20 64 6f 20 |pcodes w|hich do |
|00000100| 6e 6f 74 20 65 78 69 73 | 74 20 69 6e 20 45 6d 61 |not exis|t in Ema|
|00000110| 63 73 20 31 38 2e 0a 0a | 28 69 66 20 28 61 6e 64 |cs 18...|(if (and|
|00000120| 20 28 62 6f 75 6e 64 70 | 20 27 65 6d 61 63 73 2d | (boundp| 'emacs-|
|00000130| 76 65 72 73 69 6f 6e 29 | 0a 09 20 28 6f 72 20 28 |version)|.. (or (|
|00000140| 61 6e 64 20 28 62 6f 75 | 6e 64 70 20 27 65 70 6f |and (bou|ndp 'epo|
|00000150| 63 68 3a 3a 76 65 72 73 | 69 6f 6e 29 20 65 70 6f |ch::vers|ion) epo|
|00000160| 63 68 3a 3a 76 65 72 73 | 69 6f 6e 29 0a 09 20 20 |ch::vers|ion).. |
|00000170| 20 20 20 28 73 74 72 69 | 6e 67 2d 6c 65 73 73 70 | (stri|ng-lessp|
|00000180| 20 65 6d 61 63 73 2d 76 | 65 72 73 69 6f 6e 20 22 | emacs-v|ersion "|
|00000190| 31 39 2e 32 39 22 29 29 | 29 0a 20 20 20 20 28 65 |19.29"))|). (e|
|000001a0| 72 72 6f 72 20 22 60 6d | 61 69 6c 68 65 61 64 65 |rror "`m|ailheade|
|000001b0| 72 2e 65 6c 27 20 77 61 | 73 20 63 6f 6d 70 69 6c |r.el' wa|s compil|
|000001c0| 65 64 20 66 6f 72 20 45 | 6d 61 63 73 20 31 39 2e |ed for E|macs 19.|
|000001d0| 32 39 20 6f 72 20 6c 61 | 74 65 72 22 29 29 0a 0a |29 or la|ter"))..|
|000001e0| 0a 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c0 09 42 |.(byte-c|ode "..B|
|000001f0| 11 c0 87 22 20 5b 68 65 | 61 64 65 72 73 20 63 75 |..." [he|aders cu|
|00000200| 72 72 65 6e 74 2d 6c 6f | 61 64 2d 6c 69 73 74 5d |rrent-lo|ad-list]|
|00000210| 20 32 29 0a 23 40 32 31 | 30 20 45 78 74 72 61 63 | 2).#@21|0 Extrac|
|00000220| 74 20 68 65 61 64 65 72 | 73 20 66 72 6f 6d 20 63 |t header|s from c|
|00000230| 75 72 72 65 6e 74 20 62 | 75 66 66 65 72 20 61 66 |urrent b|uffer af|
|00000240| 74 65 72 20 70 6f 69 6e | 74 2e 0a 52 65 74 75 72 |ter poin|t..Retur|
|00000250| 6e 73 20 61 20 68 65 61 | 64 65 72 20 61 6c 69 73 |ns a hea|der alis|
|00000260| 74 2c 20 77 68 65 72 65 | 20 65 61 63 68 20 65 6c |t, where| each el|
|00000270| 65 6d 65 6e 74 20 69 73 | 20 61 20 63 6f 6e 73 20 |ement is| a cons |
|00000280| 63 65 6c 6c 20 28 6e 61 | 6d 65 20 2e 20 76 61 6c |cell (na|me . val|
|00000290| 75 65 29 2c 0a 77 68 65 | 72 65 20 4e 41 4d 45 20 |ue),.whe|re NAME |
|000002a0| 69 73 20 61 20 73 79 6d | 62 6f 6c 2c 20 61 6e 64 |is a sym|bol, and|
|000002b0| 20 56 41 4c 55 45 20 69 | 73 20 74 68 65 20 73 74 | VALUE i|s the st|
|000002c0| 72 69 6e 67 20 76 61 6c | 75 65 20 6f 66 20 74 68 |ring val|ue of th|
|000002d0| 65 20 68 65 61 64 65 72 | 20 68 61 76 69 6e 67 0a |e header| having.|
|000002e0| 74 68 61 74 20 6e 61 6d | 65 2e 1f 0a 28 64 65 66 |that nam|e...(def|
|000002f0| 61 6c 69 61 73 20 27 6d | 61 69 6c 2d 68 65 61 64 |alias 'm|ail-head|
|00000300| 65 72 2d 65 78 74 72 61 | 63 74 20 23 5b 6e 69 6c |er-extra|ct #[nil|
|00000310| 20 22 c0 60 c0 89 19 1a | 1b 1c 60 89 12 83 77 00 | ".`....|..`...w.|
|00000320| c5 c0 77 c6 56 83 77 00 | 67 c7 55 83 77 00 60 89 |..w.V.w.|g.U.w.`.|
|00000330| 11 83 77 00 c0 75 88 c8 | c0 77 c6 56 83 77 00 c9 |..w..u..|.w.V.w..|
|00000340| 5c 6e 09 7b 97 21 60 c0 | 7f 88 60 7b 43 1e 5c 6e |\n.{.!`.|..`{C.\n|
|00000350| 1e 0b c0 75 88 c8 c0 77 | c6 56 83 57 00 60 c0 7f |...u...w|.V.W.`..|
|00000360| 88 60 7b 0e 5c 6e 42 16 | 5c 6e 82 3e 00 0e 5c 6e |.`{.\nB.|\n.>..\n|
|00000370| 41 83 6a 00 0e 0b cc cd | 0e 5c 6e 9f ce 23 42 82 |A.j.....|.\n..#B.|
|00000380| 70 00 0e 0b 0e 5c 6e 40 | 42 5c 66 42 14 2a 82 08 |p....\n@|B\fB.*..|
|00000390| 00 0b 62 88 5c 66 9f 2c | 87 22 20 5b 6e 69 6c 20 |..b.\f.,|." [nil |
|000003a0| 65 6e 64 20 73 74 61 72 | 74 20 74 6f 70 20 6d 65 |end star|t top me|
|000003b0| 73 73 61 67 65 2d 68 65 | 61 64 65 72 73 20 22 5e |ssage-he|aders "^|
|000003c0| 00 2d 20 3a 22 20 30 20 | 35 38 20 22 20 09 22 20 |.- :" 0 |58 " ." |
|000003d0| 69 6e 74 65 72 6e 20 76 | 61 6c 75 65 20 68 65 61 |intern v|alue hea|
|000003e0| 64 65 72 20 6d 61 70 63 | 6f 6e 63 61 74 20 69 64 |der mapc|oncat id|
|000003f0| 65 6e 74 69 74 79 20 22 | 20 22 5d 20 35 20 28 23 |entity "| "] 5 (#|
|00000400| 24 20 2e 20 35 33 38 29 | 5d 29 0a 23 40 32 33 30 |$ . 538)|]).#@230|
|00000410| 20 45 78 74 72 61 63 74 | 20 68 65 61 64 65 72 73 | Extract| headers|
|00000420| 20 66 72 6f 6d 20 63 75 | 72 72 65 6e 74 20 62 75 | from cu|rrent bu|
|00000430| 66 66 65 72 20 61 66 74 | 65 72 20 70 6f 69 6e 74 |ffer aft|er point|
|00000440| 2c 20 77 69 74 68 6f 75 | 74 20 70 72 6f 70 65 72 |, withou|t proper|
|00000450| 74 69 65 73 2e 0a 52 65 | 74 75 72 6e 73 20 61 20 |ties..Re|turns a |
|00000460| 68 65 61 64 65 72 20 61 | 6c 69 73 74 2c 20 77 68 |header a|list, wh|
|00000470| 65 72 65 20 65 61 63 68 | 20 65 6c 65 6d 65 6e 74 |ere each| element|
|00000480| 20 69 73 20 61 20 63 6f | 6e 73 20 63 65 6c 6c 20 | is a co|ns cell |
|00000490| 28 6e 61 6d 65 20 2e 20 | 76 61 6c 75 65 29 2c 0a |(name . |value),.|
|000004a0| 77 68 65 72 65 20 4e 41 | 4d 45 20 69 73 20 61 20 |where NA|ME is a |
|000004b0| 73 79 6d 62 6f 6c 2c 20 | 61 6e 64 20 56 41 4c 55 |symbol, |and VALU|
|000004c0| 45 20 69 73 20 74 68 65 | 20 73 74 72 69 6e 67 20 |E is the| string |
|000004d0| 76 61 6c 75 65 20 6f 66 | 20 74 68 65 20 68 65 61 |value of| the hea|
|000004e0| 64 65 72 20 68 61 76 69 | 6e 67 0a 74 68 61 74 20 |der havi|ng.that |
|000004f0| 6e 61 6d 65 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 |name...(|defalias|
|00000500| 20 27 6d 61 69 6c 2d 68 | 65 61 64 65 72 2d 65 78 | 'mail-h|eader-ex|
|00000510| 74 72 61 63 74 2d 6e 6f | 2d 70 72 6f 70 65 72 74 |tract-no|-propert|
|00000520| 69 65 73 20 23 5b 6e 69 | 6c 20 22 c0 c1 c2 20 5c |ies #[ni|l "... \|
|00000530| 22 87 22 20 5b 6d 61 70 | 63 61 72 20 23 5b 28 65 |"." [map|car #[(e|
|00000540| 6c 74 29 20 22 c0 c1 5c | 6e 41 47 c3 5c 6e 41 24 |lt) "..\|nAG.\nA$|
|00000550| 88 5c 6e 87 22 20 5b 73 | 65 74 2d 74 65 78 74 2d |.\n." [s|et-text-|
|00000560| 70 72 6f 70 65 72 74 69 | 65 73 20 30 20 65 6c 74 |properti|es 0 elt|
|00000570| 20 6e 69 6c 5d 20 35 5d | 20 6d 61 69 6c 2d 68 65 | nil] 5]| mail-he|
|00000580| 61 64 65 72 2d 65 78 74 | 72 61 63 74 5d 20 33 20 |ader-ext|ract] 3 |
|00000590| 28 23 24 20 2e 20 31 30 | 34 31 29 5d 29 0a 23 40 |(#$ . 10|41)]).#@|
|000005a0| 33 33 35 20 41 70 70 6c | 79 20 50 41 52 53 49 4e |335 Appl|y PARSIN|
|000005b0| 47 2d 52 55 4c 45 53 20 | 74 6f 20 48 45 41 44 45 |G-RULES |to HEADE|
|000005c0| 52 53 2e 0a 50 41 52 53 | 49 4e 47 2d 52 55 4c 45 |RS..PARS|ING-RULE|
|000005d0| 53 20 69 73 20 61 6e 20 | 61 6c 69 73 74 20 77 68 |S is an |alist wh|
|000005e0| 6f 73 65 20 6b 65 79 73 | 20 61 72 65 20 68 65 61 |ose keys| are hea|
|000005f0| 64 65 72 20 6e 61 6d 65 | 73 20 28 73 79 6d 62 6f |der name|s (symbo|
|00000600| 6c 73 29 20 61 6e 64 20 | 77 68 6f 73 65 0a 76 61 |ls) and |whose.va|
|00000610| 6c 75 65 20 69 73 20 61 | 20 70 61 72 73 69 6e 67 |lue is a| parsing|
|00000620| 20 66 75 6e 63 74 69 6f | 6e 2e 20 20 54 68 65 20 | functio|n. The |
|00000630| 66 75 6e 63 74 69 6f 6e | 20 74 61 6b 65 73 20 6f |function| takes o|
|00000640| 6e 65 20 61 72 67 75 6d | 65 6e 74 2c 20 61 20 73 |ne argum|ent, a s|
|00000650| 74 72 69 6e 67 2c 0a 61 | 6e 64 20 72 65 74 75 72 |tring,.a|nd retur|
|00000660| 6e 20 61 20 6c 69 73 74 | 20 6f 66 20 76 61 6c 75 |n a list| of valu|
|00000670| 65 73 2c 20 77 68 69 63 | 68 20 77 69 6c 6c 20 64 |es, whic|h will d|
|00000680| 65 73 74 72 75 63 74 69 | 76 65 6c 79 20 72 65 70 |estructi|vely rep|
|00000690| 6c 61 63 65 20 74 68 65 | 20 76 61 6c 75 65 0a 61 |lace the| value.a|
|000006a0| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 74 |ssociate|d with t|
|000006b0| 68 65 20 6b 65 79 20 69 | 6e 20 48 45 41 44 45 52 |he key i|n HEADER|
|000006c0| 53 2c 20 61 66 74 65 72 | 20 62 65 69 6e 67 20 70 |S, after| being p|
|000006d0| 72 65 70 65 6e 64 65 64 | 20 77 69 74 68 20 74 68 |repended| with th|
|000006e0| 65 20 6f 72 69 67 69 6e | 61 6c 0a 76 61 6c 75 65 |e origin|al.value|
|000006f0| 2e 1f 0a 28 64 65 66 61 | 6c 69 61 73 20 27 6d 61 |...(defa|lias 'ma|
|00000700| 69 6c 2d 68 65 61 64 65 | 72 2d 70 61 72 73 65 20 |il-heade|r-parse |
|00000710| 23 5b 28 70 61 72 73 69 | 6e 67 2d 72 75 6c 65 73 |#[(parsi|ng-rules|
|00000720| 20 68 65 61 64 65 72 73 | 29 20 22 08 c1 1a 89 1b | headers|) ".....|
|00000730| 83 3a 00 0b 40 89 12 40 | 5c 66 9e 89 1d 83 32 00 |.:..@..@|\f....2.|
|00000740| 0d 41 3a 83 27 00 0d 41 | 5c 6e 41 0d 41 40 21 a1 |.A:.'..A|\nA.A@!.|
|00000750| 88 82 32 00 0d 89 41 5c | 6e 41 0d 41 21 42 a1 88 |..2...A\|nA.A!B..|
|00000760| 29 0b 41 89 13 84 08 00 | 2a 5c 66 87 22 20 5b 70 |).A.....|*\f." [p|
|00000770| 61 72 73 69 6e 67 2d 72 | 75 6c 65 73 20 6e 69 6c |arsing-r|ules nil|
|00000780| 20 72 75 6c 65 20 2d 2d | 64 6f 6c 69 73 74 2d 74 | rule --|dolist-t|
|00000790| 65 6d 70 2d 2d 38 38 33 | 30 30 20 68 65 61 64 65 |emp--883|00 heade|
|000007a0| 72 73 20 68 65 61 64 65 | 72 5d 20 35 20 28 23 24 |rs heade|r] 5 (#$|
|000007b0| 20 2e 20 31 34 34 34 29 | 5d 29 0a 23 40 33 35 32 | . 1444)|]).#@352|
|000007c0| 20 52 65 74 75 72 6e 20 | 74 68 65 20 76 61 6c 75 | Return |the valu|
|000007d0| 65 20 61 73 73 6f 63 69 | 61 74 65 64 20 77 69 74 |e associ|ated wit|
|000007e0| 68 20 68 65 61 64 65 72 | 20 48 45 41 44 45 52 20 |h header| HEADER |
|000007f0| 69 6e 20 48 45 41 44 45 | 52 2d 41 4c 49 53 54 2e |in HEADE|R-ALIST.|
|00000800| 0a 49 66 20 74 68 65 20 | 76 61 6c 75 65 20 69 73 |.If the |value is|
|00000810| 20 61 20 73 74 72 69 6e | 67 2c 20 69 74 20 69 73 | a strin|g, it is|
|00000820| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 76 61 | the ori|ginal va|
|00000830| 6c 75 65 20 6f 66 20 74 | 68 65 20 68 65 61 64 65 |lue of t|he heade|
|00000840| 72 2e 20 20 49 66 20 74 | 68 65 0a 76 61 6c 75 65 |r. If t|he.value|
|00000850| 20 69 73 20 61 20 6c 69 | 73 74 2c 20 69 74 73 20 | is a li|st, its |
|00000860| 66 69 72 73 74 20 65 6c | 65 6d 65 6e 74 20 69 73 |first el|ement is|
|00000870| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 76 61 | the ori|ginal va|
|00000880| 6c 75 65 20 6f 66 20 74 | 68 65 20 68 65 61 64 65 |lue of t|he heade|
|00000890| 72 2c 0a 77 69 74 68 20 | 61 6e 79 20 73 75 62 73 |r,.with |any subs|
|000008a0| 65 71 75 65 6e 74 20 65 | 6c 65 6d 65 6e 74 73 20 |equent e|lements |
|000008b0| 62 69 6e 67 20 74 68 65 | 20 72 65 73 75 6c 74 20 |bing the| result |
|000008c0| 6f 66 20 70 61 72 73 69 | 6e 67 20 74 68 65 20 76 |of parsi|ng the v|
|000008d0| 61 6c 75 65 2e 0a 49 66 | 20 48 45 41 44 45 52 2d |alue..If| HEADER-|
|000008e0| 41 4c 49 53 54 20 69 73 | 20 6e 69 6c 2c 20 74 68 |ALIST is| nil, th|
|000008f0| 65 20 64 79 6e 61 6d 69 | 63 61 6c 6c 79 20 62 6f |e dynami|cally bo|
|00000900| 75 6e 64 20 76 61 72 69 | 61 62 6c 65 20 60 68 65 |und vari|able `he|
|00000910| 61 64 65 72 73 27 20 69 | 73 20 75 73 65 64 2e 1f |aders' i|s used..|
|00000920| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 6d 61 69 6c |.(defali|as 'mail|
|00000930| 2d 68 65 61 64 65 72 20 | 23 5b 28 68 65 61 64 65 |-header |#[(heade|
|00000940| 72 20 26 6f 70 74 69 6f | 6e 61 6c 20 68 65 61 64 |r &optio|nal head|
|00000950| 65 72 2d 61 6c 69 73 74 | 29 20 22 08 09 86 06 00 |er-alist|) ".....|
|00000960| 5c 6e 9e 41 87 22 20 5b | 68 65 61 64 65 72 20 68 |\n.A." [|header h|
|00000970| 65 61 64 65 72 2d 61 6c | 69 73 74 20 68 65 61 64 |eader-al|ist head|
|00000980| 65 72 73 5d 20 32 20 28 | 23 24 20 2e 20 31 39 38 |ers] 2 (|#$ . 198|
|00000990| 35 29 5d 29 0a 28 70 75 | 74 20 28 71 75 6f 74 65 |5)]).(pu|t (quote|
|000009a0| 20 6d 61 69 6c 2d 68 65 | 61 64 65 72 29 20 28 71 | mail-he|ader) (q|
|000009b0| 75 6f 74 65 20 62 79 74 | 65 2d 6f 70 74 69 6d 69 |uote byt|e-optimi|
|000009c0| 7a 65 72 29 20 28 71 75 | 6f 74 65 20 62 79 74 65 |zer) (qu|ote byte|
|000009d0| 2d 63 6f 6d 70 69 6c 65 | 2d 69 6e 6c 69 6e 65 2d |-compile|-inline-|
|000009e0| 65 78 70 61 6e 64 29 29 | 0a 23 40 31 39 31 20 53 |expand))|.#@191 S|
|000009f0| 65 74 20 74 68 65 20 76 | 61 6c 75 65 20 61 73 73 |et the v|alue ass|
|00000a00| 6f 63 69 61 74 65 64 20 | 77 69 74 68 20 68 65 61 |ociated |with hea|
|00000a10| 64 65 72 20 48 45 41 44 | 45 52 20 74 6f 20 56 41 |der HEAD|ER to VA|
|00000a20| 4c 55 45 20 69 6e 20 48 | 45 41 44 45 52 2d 41 4c |LUE in H|EADER-AL|
|00000a30| 49 53 54 2e 0a 48 45 41 | 44 45 52 2d 41 4c 49 53 |IST..HEA|DER-ALIS|
|00000a40| 54 20 64 65 66 61 75 6c | 74 73 20 74 6f 20 74 68 |T defaul|ts to th|
|00000a50| 65 20 64 79 6e 61 6d 69 | 63 61 6c 6c 79 20 62 6f |e dynami|cally bo|
|00000a60| 75 6e 64 20 76 61 72 69 | 61 62 6c 65 20 60 68 65 |und vari|able `he|
|00000a70| 61 64 65 72 73 27 20 69 | 66 20 6e 69 6c 2e 0a 53 |aders' i|f nil..S|
|00000a80| 65 65 20 60 6d 61 69 6c | 2d 68 65 61 64 65 72 27 |ee `mail|-header'|
|00000a90| 20 66 6f 72 20 74 68 65 | 20 73 65 6d 61 6e 74 69 | for the| semanti|
|00000aa0| 63 73 20 6f 66 20 56 41 | 4c 55 45 2e 1f 0a 28 64 |cs of VA|LUE...(d|
|00000ab0| 65 66 61 6c 69 61 73 20 | 27 6d 61 69 6c 2d 68 65 |efalias |'mail-he|
|00000ac0| 61 64 65 72 2d 73 65 74 | 20 23 5b 28 68 65 61 64 |ader-set| #[(head|
|00000ad0| 65 72 20 76 61 6c 75 65 | 20 26 6f 70 74 69 6f 6e |er value| &option|
|00000ae0| 61 6c 20 68 65 61 64 65 | 72 2d 61 6c 69 73 74 29 |al heade|r-alist)|
|00000af0| 20 22 08 86 05 00 09 1a | 0b 5c 6e 9e 89 1c 83 15 | "......|.\n.....|
|00000b00| 00 5c 66 0d a1 88 82 1c | 00 5c 6e 0b 0d 42 43 a4 |.\f.....|.\n..BC.|
|00000b10| 88 2a 0d 87 22 20 5b 68 | 65 61 64 65 72 2d 61 6c |.*.." [h|eader-al|
|00000b20| 69 73 74 20 68 65 61 64 | 65 72 73 20 61 6c 69 73 |ist head|ers alis|
|00000b30| 74 20 68 65 61 64 65 72 | 20 65 6e 74 72 79 20 76 |t header| entry v|
|00000b40| 61 6c 75 65 5d 20 34 20 | 28 23 24 20 2e 20 32 35 |alue] 4 |(#$ . 25|
|00000b50| 34 33 29 5d 29 0a 28 70 | 75 74 20 28 71 75 6f 74 |43)]).(p|ut (quot|
|00000b60| 65 20 6d 61 69 6c 2d 68 | 65 61 64 65 72 29 20 28 |e mail-h|eader) (|
|00000b70| 71 75 6f 74 65 20 73 65 | 74 66 2d 6d 65 74 68 6f |quote se|tf-metho|
|00000b80| 64 29 20 23 5b 28 68 65 | 61 64 65 72 20 26 6f 70 |d) #[(he|ader &op|
|00000b90| 74 69 6f 6e 61 6c 20 68 | 65 61 64 65 72 2d 61 6c |tional h|eader-al|
|00000ba0| 69 73 74 29 20 22 c0 c1 | 21 1a c0 c3 21 1c c0 c5 |ist) "..|!...!...|
|00000bb0| 21 1e 06 5c 6e 5c 66 44 | 0e 07 0e 08 44 0e 06 43 |!..\n\fD|....D..C|
|00000bc0| 5c 6e 1e 07 5c 66 1e 08 | 0e 06 1e 09 ca 0e 07 0e |\n..\f..|........|
|00000bd0| 09 0e 08 46 2b cb 5c 6e | 5c 66 45 af 05 2b 87 22 |...F+.\n|\fE..+."|
|00000be0| 20 5b 67 65 6e 73 79 6d | 20 22 2d 2d 68 65 61 64 | [gensym| "--head|
|00000bf0| 65 72 2d 2d 22 20 2d 2d | 68 65 61 64 65 72 2d 2d |er--" --|header--|
|00000c00| 74 65 6d 70 2d 2d 20 22 | 2d 2d 68 65 61 64 65 72 |temp-- "|--header|
|00000c10| 2d 61 6c 69 73 74 2d 2d | 22 20 2d 2d 68 65 61 64 |-alist--|" --head|
|00000c20| 65 72 2d 61 6c 69 73 74 | 2d 2d 74 65 6d 70 2d 2d |er-alist|--temp--|
|00000c30| 20 22 2d 2d 76 61 6c 75 | 65 2d 2d 22 20 2d 2d 76 | "--valu|e--" --v|
|00000c40| 61 6c 75 65 2d 2d 74 65 | 6d 70 2d 2d 20 68 65 61 |alue--te|mp-- hea|
|00000c50| 64 65 72 20 68 65 61 64 | 65 72 2d 61 6c 69 73 74 |der head|er-alist|
|00000c60| 20 76 61 6c 75 65 20 6d | 61 69 6c 2d 68 65 61 64 | value m|ail-head|
|00000c70| 65 72 2d 73 65 74 20 6d | 61 69 6c 2d 68 65 61 64 |er-set m|ail-head|
|00000c80| 65 72 5d 20 37 5d 29 0a | 23 40 34 38 35 20 52 65 |er] 7]).|#@485 Re|
|00000c90| 74 75 72 6e 20 61 20 6e | 65 77 20 68 65 61 64 65 |turn a n|ew heade|
|00000ca0| 72 20 61 6c 69 73 74 20 | 77 69 74 68 20 4d 45 52 |r alist |with MER|
|00000cb0| 47 45 2d 52 55 4c 45 53 | 20 61 70 70 6c 69 65 64 |GE-RULES| applied|
|00000cc0| 20 74 6f 20 48 45 41 44 | 45 52 53 2e 0a 4d 45 52 | to HEAD|ERS..MER|
|00000cd0| 47 45 2d 52 55 4c 45 53 | 20 69 73 20 61 6e 20 61 |GE-RULES| is an a|
|00000ce0| 6c 69 73 74 20 77 68 6f | 73 65 20 6b 65 79 73 20 |list who|se keys |
|00000cf0| 61 72 65 20 68 65 61 64 | 65 72 20 6e 61 6d 65 73 |are head|er names|
|00000d00| 20 28 73 79 6d 62 6f 6c | 73 29 20 61 6e 64 20 77 | (symbol|s) and w|
|00000d10| 68 6f 73 65 0a 76 61 6c | 75 65 73 20 61 72 65 20 |hose.val|ues are |
|00000d20| 66 6f 72 6d 73 20 74 6f | 20 65 76 61 6c 75 61 74 |forms to| evaluat|
|00000d30| 65 2c 20 74 68 65 20 72 | 65 73 75 6c 74 73 20 6f |e, the r|esults o|
|00000d40| 66 20 77 68 69 63 68 20 | 61 72 65 20 74 68 65 20 |f which |are the |
|00000d50| 6e 65 77 20 68 65 61 64 | 65 72 73 2e 20 20 49 74 |new head|ers. It|
|00000d60| 0a 73 68 6f 75 6c 64 20 | 62 65 20 61 20 73 74 72 |.should |be a str|
|00000d70| 69 6e 67 20 6f 72 20 61 | 20 6c 69 73 74 20 6f 66 |ing or a| list of|
|00000d80| 20 73 74 72 69 6e 67 2e | 20 20 54 68 65 20 66 69 | string.| The fi|
|00000d90| 72 73 74 20 65 6c 65 6d | 65 6e 74 20 6d 61 79 20 |rst elem|ent may |
|00000da0| 62 65 20 6e 69 6c 20 74 | 6f 0a 64 65 6e 6f 74 65 |be nil t|o.denote|
|00000db0| 20 74 68 61 74 20 74 68 | 65 20 66 6f 72 6d 61 74 | that th|e format|
|00000dc0| 74 69 6e 67 20 66 75 6e | 63 74 69 6f 6e 73 20 6d |ting fun|ctions m|
|00000dd0| 75 73 74 20 75 73 65 20 | 74 68 65 20 72 65 6d 61 |ust use |the rema|
|00000de0| 69 6e 69 6e 67 20 65 6c | 65 6d 65 6e 74 73 2c 20 |ining el|ements, |
|00000df0| 6f 72 0a 73 6b 69 70 20 | 74 68 65 20 68 65 61 64 |or.skip |the head|
|00000e00| 65 72 20 61 6c 74 6f 67 | 65 74 68 65 72 20 69 66 |er altog|ether if|
|00000e10| 20 74 68 65 72 65 20 61 | 72 65 20 6e 6f 20 6f 74 | there a|re no ot|
|00000e20| 68 65 72 20 65 6c 65 6d | 65 6e 74 73 2e 0a 20 20 |her elem|ents.. |
|00000e30| 54 68 65 20 6d 61 63 72 | 6f 20 60 6d 61 69 6c 2d |The macr|o `mail-|
|00000e40| 68 65 61 64 65 72 27 20 | 63 61 6e 20 62 65 20 75 |header' |can be u|
|00000e50| 73 65 64 20 74 6f 20 61 | 63 63 65 73 73 20 68 65 |sed to a|ccess he|
|00000e60| 61 64 65 72 73 20 69 6e | 20 48 45 41 44 45 52 53 |aders in| HEADERS|
|00000e70| 2e 1f 0a 28 64 65 66 61 | 6c 69 61 73 20 27 6d 61 |...(defa|lias 'ma|
|00000e80| 69 6c 2d 68 65 61 64 65 | 72 2d 6d 65 72 67 65 20 |il-heade|r-merge |
|00000e90| 23 5b 28 6d 65 72 67 65 | 2d 72 75 6c 65 73 20 68 |#[(merge|-rules h|
|00000ea0| 65 61 64 65 72 73 29 20 | 22 c0 c1 5c 6e 5c 22 87 |eaders) |"..\n\".|
|00000eb0| 22 20 5b 6d 61 70 63 61 | 72 20 23 5b 28 72 75 6c |" [mapca|r #[(rul|
|00000ec0| 65 29 20 22 08 40 c1 08 | 41 21 42 87 22 20 5b 72 |e) ".@..|A!B." [r|
|00000ed0| 75 6c 65 20 65 76 61 6c | 5d 20 33 5d 20 6d 65 72 |ule eval|] 3] mer|
|00000ee0| 67 65 2d 72 75 6c 65 73 | 5d 20 33 20 28 23 24 20 |ge-rules|] 3 (#$ |
|00000ef0| 2e 20 33 32 31 34 29 5d | 29 0a 28 62 79 74 65 2d |. 3214)]|).(byte-|
|00000f00| 63 6f 64 65 20 22 c0 c1 | 21 84 08 00 c2 11 c1 0b |code "..|!.......|
|00000f10| 42 13 c0 87 22 20 5b 62 | 6f 75 6e 64 70 20 6d 61 |B..." [b|oundp ma|
|00000f20| 69 6c 2d 68 65 61 64 65 | 72 2d 66 6f 72 6d 61 74 |il-heade|r-format|
|00000f30| 2d 66 75 6e 63 74 69 6f | 6e 20 23 5b 28 68 65 61 |-functio|n #[(hea|
|00000f40| 64 65 72 20 76 61 6c 75 | 65 29 20 22 c0 c1 5c 6e |der valu|e) "..\n|
|00000f50| 21 21 c3 5c 66 3a 83 10 | 00 5c 66 40 82 11 00 5c |!!.\f:..|.\f@...\|
|00000f60| 66 c5 b1 04 87 22 20 5b | 63 61 70 69 74 61 6c 69 |f...." [|capitali|
|00000f70| 7a 65 20 73 79 6d 62 6f | 6c 2d 6e 61 6d 65 20 68 |ze symbo|l-name h|
|00000f80| 65 61 64 65 72 20 22 3a | 20 22 20 76 61 6c 75 65 |eader ":| " value|
|00000f90| 20 22 5c 6e 22 5d 20 34 | 20 22 46 75 6e 63 74 69 | "\n"] 4| "Functi|
|00000fa0| 6f 6e 20 74 6f 20 66 6f | 72 6d 61 74 20 68 65 61 |on to fo|rmat hea|
|00000fb0| 64 65 72 73 20 77 69 74 | 68 6f 75 74 20 61 20 73 |ders wit|hout a s|
|00000fc0| 70 65 63 69 66 69 65 64 | 20 66 6f 72 6d 61 74 74 |pecified| formatt|
|00000fd0| 69 6e 67 20 66 75 6e 63 | 74 69 6f 6e 2e 22 5d 20 |ing func|tion."] |
|00000fe0| 63 75 72 72 65 6e 74 2d | 6c 6f 61 64 2d 6c 69 73 |current-|load-lis|
|00000ff0| 74 5d 20 32 29 0a 23 40 | 36 31 36 20 55 73 65 20 |t] 2).#@|616 Use |
|00001000| 46 4f 52 4d 41 54 2d 52 | 55 4c 45 53 20 74 6f 20 |FORMAT-R|ULES to |
|00001010| 66 6f 72 6d 61 74 20 48 | 45 41 44 45 52 53 20 61 |format H|EADERS a|
|00001020| 6e 64 20 69 6e 73 65 72 | 74 20 69 6e 74 6f 20 63 |nd inser|t into c|
|00001030| 75 72 72 65 6e 74 20 62 | 75 66 66 65 72 2e 0a 46 |urrent b|uffer..F|
|00001040| 4f 52 4d 41 54 2d 52 55 | 4c 45 53 20 69 73 20 61 |ORMAT-RU|LES is a|
|00001050| 6e 20 61 6c 69 73 74 20 | 77 68 6f 73 65 20 6b 65 |n alist |whose ke|
|00001060| 79 73 20 61 72 65 20 68 | 65 61 64 65 72 20 6e 61 |ys are h|eader na|
|00001070| 6d 65 73 20 28 73 79 6d | 62 6f 6c 73 29 2c 20 61 |mes (sym|bols), a|
|00001080| 6e 64 20 77 68 6f 73 65 | 0a 76 61 6c 75 65 73 20 |nd whose|.values |
|00001090| 61 72 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 74 68 |are func|tions th|
|000010a0| 61 74 20 66 6f 72 6d 61 | 74 20 74 68 65 20 68 65 |at forma|t the he|
|000010b0| 61 64 65 72 2c 20 74 68 | 65 20 72 65 73 75 6c 74 |ader, th|e result|
|000010c0| 73 20 6f 66 20 77 68 69 | 63 68 20 61 72 65 0a 69 |s of whi|ch are.i|
|000010d0| 6e 73 65 72 74 65 64 2c | 20 75 6e 6c 65 73 73 20 |nserted,| unless |
|000010e0| 69 74 20 69 73 20 6e 69 | 6c 2e 20 20 54 68 65 20 |it is ni|l. The |
|000010f0| 66 75 6e 63 74 69 6f 6e | 20 74 61 6b 65 73 20 74 |function| takes t|
|00001100| 77 6f 20 61 72 67 75 6d | 65 6e 74 73 2c 20 74 68 |wo argum|ents, th|
|00001110| 65 20 68 65 61 64 65 72 | 0a 73 79 6d 62 6f 6c 2c |e header|.symbol,|
|00001120| 20 61 6e 64 20 74 68 65 | 20 76 61 6c 75 65 20 6f | and the| value o|
|00001130| 66 20 74 68 61 74 20 68 | 65 61 64 65 72 2e 20 20 |f that h|eader. |
|00001140| 49 66 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |If the f|unction |
|00001150| 69 74 73 65 6c 66 20 69 | 73 20 6e 69 6c 2c 20 74 |itself i|s nil, t|
|00001160| 68 65 0a 64 65 66 61 75 | 6c 74 20 61 63 74 69 6f |he.defau|lt actio|
|00001170| 6e 20 69 73 20 74 6f 20 | 69 6e 73 65 72 74 20 74 |n is to |insert t|
|00001180| 68 65 20 76 61 6c 75 65 | 20 6f 66 20 74 68 65 20 |he value| of the |
|00001190| 68 65 61 64 65 72 2c 20 | 75 6e 6c 65 73 73 20 69 |header, |unless i|
|000011a0| 74 20 69 73 20 6e 69 6c | 2e 0a 54 68 65 20 68 65 |t is nil|..The he|
|000011b0| 61 64 65 72 73 20 61 72 | 65 20 69 6e 73 65 72 74 |aders ar|e insert|
|000011c0| 65 64 20 69 6e 20 74 68 | 65 20 6f 72 64 65 72 20 |ed in th|e order |
|000011d0| 6f 66 20 74 68 65 20 46 | 4f 52 4d 41 54 2d 52 55 |of the F|ORMAT-RU|
|000011e0| 4c 45 53 2e 0a 41 20 6b | 65 79 20 6f 66 20 74 20 |LES..A k|ey of t |
|000011f0| 72 65 70 72 65 73 65 6e | 74 73 20 61 6e 79 20 6f |represen|ts any o|
|00001200| 74 68 65 72 77 69 73 65 | 20 75 6e 6d 65 6e 74 69 |therwise| unmenti|
|00001210| 6f 6e 65 64 20 68 65 61 | 64 65 72 73 2e 0a 41 20 |oned hea|ders..A |
|00001220| 6b 65 79 20 6f 66 20 6e | 69 6c 20 68 61 73 20 61 |key of n|il has a|
|00001230| 73 20 69 74 73 20 76 61 | 6c 75 65 20 61 20 6c 69 |s its va|lue a li|
|00001240| 73 74 20 6f 66 20 64 65 | 66 61 75 6c 74 65 64 20 |st of de|faulted |
|00001250| 68 65 61 64 65 72 73 20 | 74 6f 20 69 67 6e 6f 72 |headers |to ignor|
|00001260| 65 2e 1f 0a 28 64 65 66 | 61 6c 69 61 73 20 27 6d |e...(def|alias 'm|
|00001270| 61 69 6c 2d 68 65 61 64 | 65 72 2d 66 6f 72 6d 61 |ail-head|er-forma|
|00001280| 74 20 23 5b 28 66 6f 72 | 6d 61 74 2d 72 75 6c 65 |t #[(for|mat-rule|
|00001290| 73 20 68 65 61 64 65 72 | 73 29 20 22 c0 c1 5c 6e |s header|s) "..\n|
|000012a0| 9e 41 c3 c4 5c 6e 5c 22 | 5c 22 1d 5c 6e c1 1e 06 |.A..\n\"|\".\n...|
|000012b0| 89 1e 07 83 af 00 0e 07 | 40 89 16 06 40 89 1e 08 |........|@...@...|
|000012c0| c1 1e 09 89 1e 08 0e 09 | 86 2c 00 0e 5c 6e 9e 41 |........|.,..\n.A|
|000012d0| 2a 1e 0b 0e 08 83 a5 00 | 0e 08 cc 3d 83 86 00 0e |*.......|...=....|
|000012e0| 5c 6e c1 1e 0d 89 1e 0e | 83 82 00 0e 0e 40 89 16 |\n......|.....@..|
|000012f0| 0d 40 0d 3e 84 79 00 0e | 0d 40 1e 08 0e 0d 41 1e |.@.>.y..|.@....A.|
|00001300| 0b 0e 06 41 83 70 00 0e | 06 41 0e 08 0e 0b 5c 22 |...A.p..|.A....\"|
|00001310| 88 82 78 00 0e 0f 0e 08 | 0e 0b 5c 22 88 2a 0e 0e |..x.....|..\".*..|
|00001320| 41 89 16 0e 84 48 00 2a | 82 a5 00 0e 0b 83 a5 00 |A....H.*|........|
|00001330| 0e 06 41 83 9d 00 0e 06 | 41 0e 08 0e 0b 5c 22 88 |..A.....|A....\".|
|00001340| 82 a5 00 0e 0f 0e 08 0e | 0b 5c 22 88 2a 0e 07 41 |........|.\".*..A|
|00001350| 89 16 07 84 15 00 2a d0 | 63 29 87 22 20 5b 61 70 |......*.|c)." [ap|
|00001360| 70 65 6e 64 20 6e 69 6c | 20 66 6f 72 6d 61 74 2d |pend nil| format-|
|00001370| 72 75 6c 65 73 20 6d 61 | 70 63 61 72 20 63 61 72 |rules ma|pcar car|
|00001380| 20 69 67 6e 6f 72 65 20 | 72 75 6c 65 20 2d 2d 64 | ignore |rule --d|
|00001390| 6f 6c 69 73 74 2d 74 65 | 6d 70 2d 2d 38 38 33 30 |olist-te|mp--8830|
|000013a0| 37 20 68 65 61 64 65 72 | 20 68 65 61 64 65 72 2d |7 header| header-|
|000013b0| 61 6c 69 73 74 20 68 65 | 61 64 65 72 73 20 76 61 |alist he|aders va|
|000013c0| 6c 75 65 20 74 20 64 65 | 66 61 75 6c 74 65 64 20 |lue t de|faulted |
|000013d0| 2d 2d 64 6f 6c 69 73 74 | 2d 74 65 6d 70 2d 2d 38 |--dolist|-temp--8|
|000013e0| 38 33 30 38 20 6d 61 69 | 6c 2d 68 65 61 64 65 72 |8308 mai|l-header|
|000013f0| 2d 66 6f 72 6d 61 74 2d | 66 75 6e 63 74 69 6f 6e |-format-|function|
|00001400| 20 22 5c 6e 22 5d 20 35 | 20 28 23 24 20 2e 20 34 | "\n"] 5| (#$ . 4|
|00001410| 30 39 32 29 5d 29 0a 28 | 70 72 6f 76 69 64 65 20 |092)]).(|provide |
|00001420| 28 71 75 6f 74 65 20 6d | 61 69 6c 68 65 61 64 65 |(quote m|ailheade|
|00001430| 72 29 29 0a | |r)). | |
+--------+-------------------------+-------------------------+--------+--------+